﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Web;
using Microformats.Enums;
using System.Drawing.Design;
using System.Web.UI;
using System.ComponentModel.Design;
using System.Collections.ObjectModel;

namespace Microformats.Controls
{
    public class XFN
    {
        public XFN()
        {
            this.ProfessionalCollection = new Collection<ProfessionalCollection>();
            this.RomanticCollection = new Collection<RomanticCollection>();
        }

        [Bindable(true)]
        [Category("XFN")]
        [DefaultValue("")]
        [Localizable(true)]
        public bool Identity
        {
            get;
            set;
        }

        [Bindable(true)]
        [Category("XFN")]
        [DefaultValue("")]
        [Localizable(true)]
        public bool Physical
        {
            get;
            set;
        }

        [Bindable(true)]
        [Category("XFN")]
        [DefaultValue("")]
        [Localizable(true)]
        public FriendShip FriendShip
        {
            get;
            set;
        }

        [Bindable(true)]
        [Category("XFN")]
        [DefaultValue("")]
        [Localizable(true)]
        public Geographical Geographical
        {
            get;
            set;
        }

        [Bindable(true)]
        [Category("XFN")]
        [DefaultValue("")]
        [Localizable(true)]
        public Family Family
        {
            get;
            set;
        }

        [Browsable(true)]
        [Editor(typeof(CollectionEditor), typeof(UITypeEditor))]
        [Category("XFN")]
        [Description("Romantic values")]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public Collection<RomanticCollection> RomanticCollection
        {
            get;
            set;
        }

        [Browsable(true)]
        [Editor(typeof(CollectionEditor), typeof(UITypeEditor))]
        [Category("XFN")]
        [Description("Romantic values")]
        [PersistenceMode(PersistenceMode.InnerProperty)]
        public Collection<ProfessionalCollection> ProfessionalCollection
        {
            get;
            set;
        }
    }

    public class RomanticCollection
    {
        [Bindable(true)]
        [Category("XFN")]
        [DefaultValue("")]
        [Localizable(true)]
        public Romantic Romantic
        {
            get;
            set;
        }
    }

    public class ProfessionalCollection
    {
        [Bindable(true)]
        [Category("XFN")]
        [DefaultValue("")]
        [Localizable(true)]
        public Professional Professional
        {
            get;
            set;
        }
    }
}
